<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style/css/common.css" type="text/css" />
<LINK href="style/css/ui-lightness/jquery-ui-1.8.8.custom.css" type=text/css rel=stylesheet>
<title>管理区域</title>

<SCRIPT src="style/js/jquery-1.4.2.min.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/jquery-ui-1.8.6.custom.min.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/ckeditor/ckfinder/ckfinder.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/ckeditor/ckeditor.js" type=text/javascript></SCRIPT>
<SCRIPT src="style/js/main.js" type=text/javascript></SCRIPT>

<link href="style/js/Pager.css" rel="stylesheet" type="text/css" />
<script src="style/js/jquery.pager.js" type="text/javascript"></script>
<script src="style/js/jquery.simpletip-1.3.1.pack.js" type="text/javascript"></script>
<script language="javascript">
$(document).ready(function(){
	$(".editlink").click(function(){
	$(".cbg").hover(function(){$(this).css("background-color","#F3F8F7")},function(){$(this).css("background-color","")});	
});
</script>
</head>

<body>
<div id="man_zone">
 <div style="clear:both;">
    <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="table_style">
      <tr align="center" style="background-color:#F3F8F7">
        <td>&nbsp;</td>
        <td>ID</td>
        <td>标题</td>
        <td>状态</td>
        <td>发布者</td>
        <td>发布时间</td>
        <td>属性</td>
        <td>操作</td>
      </tr>
      <%foreach item=val from=$list%>
      <tr align="center" class="cbg">
        <td><input name="id[]" type="checkbox" value="<%$val.id%>" /></td>
        <td><%$val.id%></td>
        <td align="left">
        	<a href="index.php?m=system&a=preview&id=<%$val.id%>&classid=<%$val.classid%>&wid=<%$website.wid%>" style="color:#F90" target="_blank">[预览]</a> 
            <a href="http://www.baidu.com/s?wd=<%$val.title%>&ie=utf-8" target="_blank"><img src="style/images/baidu.jpg" width="16" height="16" border="0" /></a>
            <a href="index.php?m=classified&a=edit&id=<%$val.id%>&wid=<%$website.wid%>" id="<%$val.id%>" class="article" ><%$val.title%></a>
            
        </td>
       
        <td id="stat_<%$val.id%>">
        <%if $val.audit%>
        <a href="index.php?m=classified&a=set&wid=<%$website.wid%>&field=html&value=0&id=<%$val.id%>"  style="color:green;" class="ajaxBox">已审核</a>
        <%else%>
        <a href="index.php?m=classified&a=set&wid=<%$website.wid%>&field=html&value=1&id=<%$val.id%>" style="color:#CCC;" class="ajaxBox">未审核</a><%/if%>
        </td>
        <td><%$val.writer%></td>
        <td align="center"><%$val.posttime|date_format:"%Y-%m-%d"%></td>
        <td>
          <%if !empty($val.flag)%><%assign var=flag value=","|join:$val.flag%><%/if%>
          <span><a href="#" style="<%if !empty($val.flag)&&in_array('h',$val.flag)%>color:green;<%else%>color:#CCC;<%/if%>" class="classifiedSet" field="h" id="<%$val.id%>" value="<%$flag%>">头条</a></span>
          <span><a href="#" style="<%if !empty($val.flag)&&in_array('c',$val.flag)%>color:green;<%else%>color:#CCC;<%/if%>" class="classifiedSet" field="c" id="<%$val.id%>" value="<%$flag%>">推荐</a></span>
          <span><a href="#" style="<%if !empty($val.flag)&&in_array('a',$val.flag)%>color:green;<%else%>color:#CCC;<%/if%>" class="classifiedSet" field="a" id="<%$val.id%>" value="<%$flag%>">特荐</a></span>
        </td>
        <td align="center"><a href="index.php?m=classified&a=edit&id=<%$val.id%>&wid=<%$website.wid%>" id="<%$val.id%>" style="color:#F90" class="editlink" target="_blank">编辑</a> <a href="index.php?m=classified&amp;a=delete&amp;id=<%$val.id%>&ajax=1" class="delete" style="color:red;">删除</a></td>
      </tr>
      <%/foreach%>
      </table>
    <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1" class="table_style">
      <tr>
        <td align="center"></td>
        <td colspan="7" align="right">
        	<label><input name="" type="checkbox" value="" id="checkAll" />全选/反选</label>
            <input name="" type="button" value="生成" id="makePage" wid="<%$website.wid%>" classid="<%$column.classid%>" onclick="window.location.href='index.php?m=system&a=make&action=page&wid=<%$website.wid%>&classid=<%$column.classid%>&id='+getCheckBox()" />
        	<input name="" type="button" value="审核" class="ajaxBox" onclick=$(this).attr("href","index.php?m=classified&a=set&wid=<%$website.wid%>&field=html&value=1&id="+getCheckBox()); />
            <input name="" type="button" value="删除"  class="delete" onclick=$(this).attr("href","index.php?m=classified&a=delete&ajax=1&id="+getCheckBox());  />
            <input name="" type="button" value="移动" />
            <input name="" type="button" value="复制" />
        </td>
        </tr>
        <tr>
        <td align="center">
			<span>总共:<%$num%>条信息</span>
        </td>
        <td colspan="7" align="left" id="pager">
        
        </td>
        </tr>
    </table>
</div>
<div id="articleBox" style="display:none;">
</div>
<script type="text/javascript">
PageClick = function(pageclickednumber) {
	window.location = window.location.toString()+'&page='+pageclickednumber;
}
$("#pager").pager({ pagenumber: <%$page%>, pagecount: <%$pagecount%>, buttonClickCallback: PageClick });   
</script>
</body>
</html>
